<?php
/**
 * Local variables
 * @var \Phalcon\Mvc\View\Engine $this
 * @var string $name
 */
?>

<h1 class="page-header">Editing Controller: <?php echo str_replace('.php', '', $name); ?></h1>

<div class="row">
    <div class="col-md-12">
        <?php echo $this->getContent() ?>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <form method="post" action="<?php echo $this->url->get("webtools.php?_url=/controllers/save") ?>">
            <div class="row">
                <div class="col-md-12 text-right">
                    <button type="submit" class="btn btn-primary">Save</button>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <br>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <?php echo $this->tag->textArea(array('code', 'cols' => 50, 'rows' => 20)) ?>

                    <?php echo $this->tag->hiddenField('name') ?>
                </div>
            </div>
        </form>
    </div>
</div>

<?php Phalcon\Web\CodeMirror::importResources(); ?>
